import { KuiTagProps } from './type';
import { PropType, inject } from 'vue';
import { configProviderInjectionKey } from '../kui-config-provider/type';

export default {
	/**
	 * @zh 标签类型
	 */
	type: {
		type: String as PropType<KuiTagProps['type']>,
		default: '' as KuiTagProps['type']
	},
	/**
	 * @zh 页面模式
	 */
	mode: {
		type: String as PropType<KuiTagProps['mode']>,
		default: () =>
			inject(configProviderInjectionKey, undefined)?.mode ?? 'light'
	},
	/**
	 * @zh 块级标签
	 */
	block: {
		type: Boolean,
		default: false
	},
	/**
	 * @zh 标签大小
	 */
	size: {
		type: String as PropType<KuiTagProps['size']>,
		default: 'normal' as KuiTagProps['size']
	},
	/**
	 * @zh 标签形状
	 */
	shape: {
		type: String as PropType<KuiTagProps['shape']>,
		default: 'round' as KuiTagProps['shape']
	},
	/**
	 * @zh 空心标签
	 */
	plain: {
		type: Boolean,
		default: false
	},
	/**
	 * @zh 标签背景色
	 */
	backgroundColor: {
		type: String,
		default: ''
	},
	/**
	 * @zh 标签边框色
	 */
	borderColor: {
		type: String,
		default: ''
	},
	/**
	 * @zh 标签文本色
	 */
	textColor: {
		type: String,
		default: ''
	},
	/**
	 * @zh 半圆角标签
	 */
	halfRound: {
		type: String as PropType<KuiTagProps['halfRound']>,
		default: '' as KuiTagProps['halfRound']
	},
	/**
	 * @zh 主题色
	 */
	theme: {
		type: String as PropType<KuiTagProps['theme']>,
		default: '' as KuiTagProps['theme']
	},
	/**
	 * @zh 可关闭标签
	 */
	closable: {
		type: Boolean,
		default: false
	},
	/**
	 * @zh 关闭图标
	 */
	closeIcon: {
		type: String,
		default: 'cancel'
	},
	/**
	 * @zh 左图标
	 */
	leftIcon: {
		type: String,
		default: ''
	},
	/**
	 * @zh 右图标
	 */
	rightIcon: {
		type: String,
		default: ''
	},
	/**
	 * @zh 唯一标识
	 */
	name: {
		type: String,
		default: ''
	},
	/**
	 * @zh 加载中
	 */
	loading: {
		type: Boolean,
		default: false
	},
	/**
	 * @zh 加载中图标
	 */
	loadingIcon: {
		type: String,
		default: 'spinner8'
	},
	/**
	 * @zh 可选中标签
	 */
	checkable: {
		type: Boolean,
		default: false
	},
	/**
	 * @zh 默认选中状态
	 */
	defaultChecked: {
		type: Boolean,
		default: false
	},
	/**
	 * @zh 组件自动选中
	 */
	autoChecked: {
		type: Boolean,
		default: true
	}
}